import requests from '@/utils/request-proxy'

export const reqGetTradeMarkList = (page, limit) => requests({ url: `/admin/product/baseTrademark/${page}/${limit}`, method: 'get' })

// //增加品牌
// export const reqAddTradeMark = () => requests({ url: `/admin/product/baseTrademark/save`, method: 'post' })

// //修改品牌
// export const reqUpdateTradeMark=()=>requests({url:`/admin/product/baseTrademark/update`,method:'put'})

//添加或修改品牌
export const reqAddorUpdateTradeMark = (tradeMarkInfo) => {
    if (tradeMarkInfo.id) {
        return requests({ url: `/admin/product/baseTrademark/update`, method: 'put', data: tradeMarkInfo })
    } else {
        return requests({ url: `/admin/product/baseTrademark/save`, method: 'post', data: tradeMarkInfo })
    }
}

//删除品牌
export const reqDeleteTradeMark = (id) => requests({ url: `/admin/product/baseTrademark/remove/${id}`, method: 'delete' })